<template>
  <div class="page-wrap">
    <div v-if="slots.includes('form')" class="page-wrap__form">
      <slot name="form"></slot>
    </div>
    <div class="page-wrap__content">
      <slot></slot>
    </div>
  </div>
</template>
<script lang="jsx" setup>
let slots = computed(() => Object.keys(useSlots()))
</script>
<style lang="scss" scoped>
.page-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  &__form {
    display: flex;
    width: 100%;
    padding: 10px 10px 0;
  }
  &__content {
    flex: 1;
    display: flex;
    min-height: 0;
    flex-direction: column;
    margin-top: 0;
    padding: 0 10px;
    position: relative;
    box-sizing: border-box;
  }
}
</style>
